package com.ruoyi.project.digital.service.impl;

import com.ruoyi.project.common.component.WebSocketServer;
import com.ruoyi.project.digital.service.VoteService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.IOException;

@Service
@Slf4j
public class VoteServiceImpl implements VoteService {


    @Autowired
    private WebSocketServer webSocketServer;

    public synchronized void updateVisitCount(String voteId) throws IOException {
        System.out.println("投票活动访问量增加操作");
        // 服务端群发消息,更新统计数据
       // webSocketServer.batchSendMsg();

    }


    @Override
    public String findVoteStatisticsVo() {
        return null;
    }

}
